<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="shortcut icon" href="//images.skeep.cc/favicon.ico">
    <title>Skeep登录</title>

    <style>
        body {
            width: 100%;
            height: 100%;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            background: #666;
            text-align: center;
        }

        .qrcode {
            position: fixed;
            top: 50%;
            left: 50%;
            margin-left: -190px;
            margin-top: -250px;
            border-radius: 4px;
            -moz-border-radius: 4px;
            -webkit-border-radius: 4px;
            background-color: #fff;
            width: 380px;
            height: 500px;
        }

        .img {
            display: block;
            width: 250px;
            margin: 42px auto 12px;
        }

        .title {
            font-size: 18px;
        }
    </style>
</head>

<body>
    <div class="qrcode">
        <img src="/index/user/qrcode/" alt="qrcode" class="img">
        <br />
        <div class="title">请使用微信扫码登录</div>
        <!-- <br/> -->
        <img src="//images.skeep.cc/1048.gif" style="width:160px;">
    </div>

    <script src="https://cdn.bootcss.com/jquery/3.0.0/jquery.min.js"></script>

    <script>
        $(function () {

            function checkLogin() 
            {
                $.ajax({
                    type: 'post',
                    url: '/index/user/login/',
                    data: { 
                        crsfToken: '<?php echo $crsfToken; ?>' 
                    },
                    dataType: 'json',
                    success: function (data) 
                    {
                        if (data.code == 200) 
                        {
                            location.href = "/";
                        }
                        else 
                        {
                            setTimeout(checkLogin, 3000);
                        }
                    },
                    error: function (error) 
                    {
                        console.log(error);
                    }
                });
            }

            checkLogin();
        })
    </script>

</body>

</html>